package com.openharmony.filepicker.bean;

import com.openharmony.filepicker.filetype.FileType;

public class FileItemBeanImpl extends FileBean {

    private boolean isChecked;
    private FileType fileType;
    private boolean isDir;
    private boolean isHide;

    public FileItemBeanImpl(
            String fileName,
            String filePath,
            boolean isChecked,
            FileType fileType,
            boolean isDir,
            boolean isHide,
            BeanSubscriber beanSubscriber
    ) {
        this.fileName = fileName;
        this.filePath = filePath;
        this.isChecked = isChecked;
        this.fileType = fileType;
        this.isDir = isDir;
        this.isHide = isHide;
        this.beanSubscriber = beanSubscriber;
    }

    public boolean isChecked() {
        return isChecked;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
        beanSubscriber.updateItemUI(checked);
    }

    public FileType getFileType() {
        return fileType;
    }

    public void setFileType(FileType fileType) {
        this.fileType = fileType;
    }

    public boolean isDir() {
        return isDir;
    }

    public void setDir(boolean dir) {
        isDir = dir;
    }

    public boolean isHide() {
        return isHide;
    }

    public void setHide(boolean hide) {
        isHide = hide;
    }
}
